<?php
// 获取服务器域名
$serverName = $_SERVER['SERVER_NAME'];
// 获取服务器IP地址
$serverIP = gethostbyname($serverName);
echo  $_SERVER['REMOTE_ADDR'];
echo $serverIP;

